﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;

namespace ConfExpert.Forms.Ithalat
{
    public partial class UnspedMasrafKalemleri : XForm
    {
        public UnspedMasrafKalemleri()
        {
            InitializeComponent();
        }

        private void UnspedMasrafKalemleri_Load(object sender, EventArgs e)
        {
            gridView1.Init("GetUnspedMasrafKalemleri");
            gridView1.MakeColumnInvisible("UnspedMasrafKalemleriId");
            gridView1.MakeReadOnly("HesapPlaniId");
            gridView1.AddSummary();
            gridView1.BestFitColumns();

            btnKaydet.ItemClick += btnKaydet_ItemClick;
        }

        void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.EndEditing();
            gridView1.Update("", "UnspedMasrafKalemleri");
            gridView1.RefreshDataSource("GetUnspedMasrafKalemleri");
            gridView1.BestFitColumns();
        }
    }
}
